package com.fastloan.mgt.customer.model;

import com.fastloan.mgt.customer.anno.EnumObj;
import com.fastloan.mgt.customer.anno.TagAnno;
import com.fastloan.mgt.customer.enums.CustomerEnums;
import com.kawins.base.baseabs.BaseModel;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;

/**
 * @author gelon createTime 2017/11/06 客户贷款需求
 */
@javax.persistence.Table(name = "ZY_CUSTOMER_LOAN_DEMAND")
public class ZyCustomerLoanDemand extends BaseModel<String> {


    /**
     *
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TagAnno(name = "")
    private String id;
    /**
     * 客户id
     */
    @TagAnno(name = "客户id")
    private String customerId;
    /**
     * 是否准入 0不符合 1 符合
     */
    @TagAnno(name = "是否准入 0不符合 1 符合")
    private Integer whetherAdmittance;

    @Transient
    @EnumObj(mapping = "whetherAdmittance")
    private CustomerEnums.WeatherAdmittance[] whetherAdmittanceEnums = CustomerEnums.WeatherAdmittance
        .values();


    /**
     * 贷款原因
     */
    @TagAnno(name = "贷款原因")
    private String loanReason;
    /**
     * 资金需求时间
     */
    @TagAnno(name = "资金需求时间")
    private Date demandTime;
    /**
     * 抵押
     */
    @TagAnno(name = "抵押")
    private String mortgage;
    /**
     * 预计申请时间
     */
    @TagAnno(name = "预计申请时间")
    private Date estimateApplyTime;
    /**
     * 需求状态 1 已填写申请表 2 一个月内有需求  3 暂时无需求  4 完全无需求
     */
    @TagAnno(name = "需求状态 1 已填写申请表 2 一个月内有需求 3 暂时无需求 4 完全无需求")
    private Integer applyStatus;

    @Transient
    @EnumObj(mapping = "applyStatus")
    private CustomerEnums.ApplyStatus[] applyStatusEnums = CustomerEnums.ApplyStatus.values();

    /**
     * 其他需求
     */
    @TagAnno(name = "其他需求")
    private String otherDemand;


    public String getId() {
        return id;
    }

    public ZyCustomerLoanDemand setId(String id) {
        this.id = id;
        return this;
    }


    public String getCustomerId() {
        return customerId;
    }

    public ZyCustomerLoanDemand setCustomerId(String customerId) {
        this.customerId = customerId;
        return this;
    }

    public Integer getWhetherAdmittance() {
        return this.whetherAdmittance;
    }

    public ZyCustomerLoanDemand setWhetherAdmittance(Integer whetherAdmittance) {
        this.whetherAdmittance = whetherAdmittance;
        return this;
    }

    public CustomerEnums.WeatherAdmittance[] getWhetherAdmittanceEnums() {
        return whetherAdmittanceEnums;
    }


    public CustomerEnums.ApplyStatus[] getApplyStatusEnums() {
        return applyStatusEnums;
    }


    public String getLoanReason() {
        return this.loanReason;
    }

    public ZyCustomerLoanDemand setLoanReason(String loanReason) {
        this.loanReason = loanReason;
        return this;
    }

    public Date getDemandTime() {
        return this.demandTime;
    }

    public ZyCustomerLoanDemand setDemandTime(Date demandTime) {
        this.demandTime = demandTime;
        return this;
    }

    public String getMortgage() {
        return this.mortgage;
    }

    public ZyCustomerLoanDemand setMortgage(String mortgage) {
        this.mortgage = mortgage;
        return this;
    }

    public Date getEstimateApplyTime() {
        return this.estimateApplyTime;
    }

    public ZyCustomerLoanDemand setEstimateApplyTime(Date estimateApplyTime) {
        this.estimateApplyTime = estimateApplyTime;
        return this;
    }

    public Integer getApplyStatus() {
        return this.applyStatus;
    }

    public ZyCustomerLoanDemand setApplyStatus(Integer applyStatus) {
        this.applyStatus = applyStatus;
        return this;
    }

    public String getOtherDemand() {
        return this.otherDemand;
    }

    public ZyCustomerLoanDemand setOtherDemand(String otherDemand) {
        this.otherDemand = otherDemand;
        return this;
    }
}
